<style lang="less">
    @import "style/wallet.less";
</style>
<template>
    <div class="page wallet">
        <div class="item blue">
            <i class="icon money"></i>
            <div class="main">
                <div class="con">
                    <div class="title">账户余额</div>
                    <div class="body"><em>{{serverData.cash}}</em>元</div>
                </div>
                <i></i>
                <div class="con">
                    <div class="title">累计金额</div>
                    <div class="body"><em>{{serverData.amount}}</em>元</div>
                </div>
            </div>
            <i class="next">></i>
            <a href="#money">去提现</a>
        </div>
        <div class="item yellow">
            <i class="icon coin"></i>
            <div class="main">
                <div class="con">
                    <div class="title">金币</div>
                    <div class="body"><em>{{serverData.goldcoins}}</em>G</div>
                </div>
                <i></i>
                <div class="con">
                    <div class="title">累计金币</div>
                    <div class="body"><em>{{serverData.goldcoinstotal}}</em>G</div>
                </div>
            </div>
            <i class="next">></i>
            <a href="#money">去使用</a>
        </div>
        <div class="item red">
            <i class="icon quan"></i>
            <div class="main">
                <div class="con">
                    <div class="title">奖券</div>
                    <div class="body"><em>{{serverData.ticketNum}}</em>张</div>
                </div>
                <i></i>
                <div class="con">
                    <div class="title">累计奖券</div>
                    <div class="body"><em>{{serverData.ticketTotal}}</em>张</div>
                </div>
            </div>
            <i class="next">></i>
            <a href="#lucky">去使用</a>
        </div>
    </div>
</template>
<script type="text/ecmascript-6">
    import server from '../lib/server'
    export default {
        data(){
            return {
                serverData:{}
            }
        },
        created(){
            server('/P/U/getuseraccount_wx').success((res)=>{
                if(res.code==1){
                    this.serverData=res.data;
                }else{
                    alert(res.msg);
                }
            });
        }
    }
</script>